<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/vue2.min.js"></script>
    <script src="/js/axios.min.js"></script>
    <style>
        table.gridtable {
            font-family: verdana,arial,sans-serif;
            font-size:11px;
            color:#333333;
            border-width: 1px;
            border-color: #666666;
            border-collapse: collapse;
        }
        table.gridtable th {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #dedede;
        }
        table.gridtable td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<form action="/project/updateProject" method="post">
<table id="project" class="gridtable">
    <tr>
        <th>项目id</th>
        <th><input type="text" name="pid" :value="project.pid" readonly></th>
    </tr>
    <tr>
        <th>项目名称</th>
        <td><input type="text" name="pname" :value="project.pname"/></td>
    </tr>
    <tr>
        <th>开始时间</th>
        <td><input type="text" name="starttime" :value="project.starttime"/></td>
    </tr>
    <tr>
        <th>结束时间</th>
        <td> <input type="text" name="endtiem" :value="project.endtiem"/></td>

    </tr>
    <tr>
        <th>开发商id</th>
       <td> <input type="text" name="did" :value="project.did"/></td>
    </tr>
    <tr>
        <th>承建商id</th>
       <td><input type="cid" name="did" :value="project.cid"/></td>
    </tr>
</table>
    <input type="submit" value="修改">
</form>
</body>
<script>
    var app= new Vue({
        el : "#project",
        data : {
            project:{},
        }
    })
    window.onload = init;
    window.onbeforeunload = init;
    function init() {
        alert(window.location.search.replace("?","&"))
        axios.get("project/findOne"+window.location.search).then(res=>{
            console.log(res)
            app.project=res.data;
        });
    }
</script>
</html>